package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.MqttConfig;
import com.ruoyi.system.mapper.MqttConfigMapper;
import com.ruoyi.system.service.IMqttConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * MQTT配置信息Service业务层处理
 * 
 * @author LGD
 * @date 2025-07-18
 */
@Service
public class MqttConfigServiceImpl implements IMqttConfigService
{
    @Autowired
    private MqttConfigMapper mqttConfigMapper;

    /**
     * 查询MQTT配置信息
     * 
     * @param configId MQTT配置信息主键
     * @return MQTT配置信息
     */
    @Override
    public MqttConfig selectMqttConfigByConfigId(Long configId)
    {
        return mqttConfigMapper.selectMqttConfigByConfigId(configId);
    }

    /**
     * 查询MQTT配置信息列表
     * 
     * @param mqttConfig MQTT配置信息
     * @return MQTT配置信息
     */
    @Override
    public List<MqttConfig> selectMqttConfigList(MqttConfig mqttConfig)
    {
        return mqttConfigMapper.selectMqttConfigList(mqttConfig);
    }

    /**
     * 新增MQTT配置信息
     * 
     * @param mqttConfig MQTT配置信息
     * @return 结果
     */
//    @Override
//    public int insertMqttConfig(MqttConfig mqttConfig)
//    {
//        return mqttConfigMapper.insertMqttConfig(mqttConfig);
//    }

    /**
     * 修改MQTT配置信息
     * 
     * @param mqttConfig MQTT配置信息
     * @return 结果
     */
    @Override
    public int updateMqttConfig(MqttConfig mqttConfig)
    {
        return mqttConfigMapper.updateMqttConfig(mqttConfig);
    }

    /**
     * 批量删除MQTT配置信息
     * 
     * @param configIds 需要删除的MQTT配置信息主键
     * @return 结果
     */
    @Override
    public int deleteMqttConfigByConfigIds(Long[] configIds)
    {
        return mqttConfigMapper.deleteMqttConfigByConfigIds(configIds);
    }

    /**
     * 删除MQTT配置信息信息
     * 
     * @param configId MQTT配置信息主键
     * @return 结果
     */
    @Override
    public int deleteMqttConfigByConfigId(Long configId)
    {
        return mqttConfigMapper.deleteMqttConfigByConfigId(configId);
    }
}
